<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>thunar-gobject-extensions: Thunar Internal Functions Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Thunar Internal Functions Reference Manual">
<link rel="up" href="glib-gtk-extensions.html" title="Part I. Glib/GTK Extensions">
<link rel="prev" href="glib-gtk-extensions.html" title="Part I. Glib/GTK Extensions">
<link rel="next" href="thunar-thunar-gio-extensions.html" title="thunar-gio-extensions">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#thunar-thunar-gobject-extensions.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="glib-gtk-extensions.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="glib-gtk-extensions.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="thunar-thunar-gio-extensions.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="thunar-thunar-gobject-extensions"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="thunar-thunar-gobject-extensions.top_of_page"></a>thunar-gobject-extensions</span></h2>
<p>thunar-gobject-extensions</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="thunar-thunar-gobject-extensions.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="thunar-thunar-gobject-extensions.html#G-OBJECT-WARN-INVALID-PROPERTY-ID:CAPS" title="G_OBJECT_WARN_INVALID_PROPERTY_ID()">G_OBJECT_WARN_INVALID_PROPERTY_ID</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="thunar-thunar-gobject-extensions.html#thunar-g-initialize-transformations" title="thunar_g_initialize_transformations ()">thunar_g_initialize_transformations</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="thunar-thunar-gobject-extensions.html#thunar-g-strescape" title="thunar_g_strescape ()">thunar_g_strescape</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="thunar-thunar-gobject-extensions.html#thunar-g-utf8-normalize-for-search" title="thunar_g_utf8_normalize_for_search ()">thunar_g_utf8_normalize_for_search</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="thunar-thunar-gobject-extensions.html#thunar-g-app-info-equal" title="thunar_g_app_info_equal ()">thunar_g_app_info_equal</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="thunar-thunar-gobject-extensions.html#thunar-g-object-set-guint-data" title="thunar_g_object_set_guint_data ()">thunar_g_object_set_guint_data</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="thunar-thunar-gobject-extensions.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="thunar-thunar-gobject-extensions.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="G-OBJECT-WARN-INVALID-PROPERTY-ID:CAPS"></a><h3>G_OBJECT_WARN_INVALID_PROPERTY_ID()</h3>
<pre class="programlisting">#define G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec) G_STMT_START{ (void)0; }G_STMT_END
</pre>
</div>
<hr>
<div class="refsect2">
<a name="thunar-g-initialize-transformations"></a><h3>thunar_g_initialize_transformations ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
thunar_g_initialize_transformations (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Registers various transformation functions to the
GLib Type System, which are used by <code class="function">g_value_transform()</code>
to transform between different kinds of values.</p>
</div>
<hr>
<div class="refsect2">
<a name="thunar-g-strescape"></a><h3>thunar_g_strescape ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
thunar_g_strescape (<em class="parameter"><code>const <span class="type">gchar</span> *source</code></em>);</pre>
<p>Similar to g_strescape, but as well escapes SPACE</p>
<p>Escapes the special characters '\b', '\f', '\n', '\r', '\t', '\v', '\' ' ' and '"' in the string source by inserting a '\' before them.
Additionally all characters in the range 0x01-0x1F (SPACE and everything below)
and in the range 0x7F-0xFF (all non-ASCII chars) are replaced with a '\' followed by their octal representation.</p>
<div class="refsect3">
<a name="thunar-g-strescape.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>source</p></td>
<td class="parameter_description"><p>The string to escape</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="thunar-g-strescape.returns"></a><h4>Returns</h4>
<p>The new string. Has to be freed with g_free after usage. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="thunar-g-utf8-normalize-for-search"></a><h3>thunar_g_utf8_normalize_for_search ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
thunar_g_utf8_normalize_for_search (<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>,
                                    <em class="parameter"><code><span class="type">gboolean</span> strip_diacritics</code></em>,
                                    <em class="parameter"><code><span class="type">gboolean</span> casefold</code></em>);</pre>
<p>Canonicalize a UTF-8 string into a form suitable for substring
matching against other strings passed through this function with the
same options. The strings produced by this function cannot be
transformed back into the original string. They can however be
matched against each other with functions like <code class="function">g_strrstr()</code> that
aren't Unicode-aware.</p>
<p>The implementation is currently not locale-aware, and relies only on
what GLib can do. It may change, so these strings should not be
persisted to disk and reused later.</p>
<p>Do not use these strings for sorting. Use <code class="function">g_utf8_collate_key()</code>
instead.</p>
<p>Like <code class="function">g_utf8_normalize()</code>, this returns NULL if the string is not valid
UTF-8.</p>
<div class="refsect3">
<a name="thunar-g-utf8-normalize-for-search.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>The string to normalize, zero-terminated.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>strip_diacritics</p></td>
<td class="parameter_description"><p>Remove diacritics, leaving only base characters.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>casefold</p></td>
<td class="parameter_description"><p>Fold case, to ignore letter case distinctions.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="thunar-g-utf8-normalize-for-search.returns"></a><h4>Returns</h4>
<p>The normalized string, or NULL. Free non-NULL values with <code class="function">g_free()</code> after use. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="thunar-g-app-info-equal"></a><h3>thunar_g_app_info_equal ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
thunar_g_app_info_equal (<em class="parameter"><code><span class="type">gpointer</span> appinfo1</code></em>,
                         <em class="parameter"><code><span class="type">gpointer</span> appinfo2</code></em>);</pre>
<p>For unknown reason "g_app_info_equal" does weird stuff / crashes thunar in some cases.
(select two files of the same type + Sent to --&gt; mail recipient )
So we use this trivial method to compare applications for now.</p>
<div class="refsect3">
<a name="thunar-g-app-info-equal.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>appinfo1</p></td>
<td class="parameter_description"><p>The first g_app_info object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>appinfo2</p></td>
<td class="parameter_description"><p>The second g_app_info object</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="thunar-g-app-info-equal.returns"></a><h4>Returns</h4>
<p> : TRUE if appinfo1 is equal to appinfo2. FALSE otherwise.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="thunar-g-object-set-guint-data"></a><h3>thunar_g_object_set_guint_data ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
thunar_g_object_set_guint_data (<em class="parameter"><code><span class="type">GObject</span> *object</code></em>,
                                <em class="parameter"><code>const <span class="type">gchar</span> *key</code></em>,
                                <em class="parameter"><code><span class="type">guint</span> data</code></em>);</pre>
<p>Since it is not possible to set a plain uint to a G_OBJECT, we need to use a pointer
This helper method encapsulates the process of doing so</p>
<div class="refsect3">
<a name="thunar-g-object-set-guint-data.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>object</p></td>
<td class="parameter_description"><p>The <span class="type">GObject</span> to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>key for which the data should be set</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>guint value to set as data</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>